package com.huilian.iotbox.client.service.impl;

import com.huilian.iotbox.client.service.ErrorLogService;
import com.huilian.iotbox.data.common.ServerResponse;
import com.huilian.iotbox.data.dto.ErrorLogDto;
import com.huilian.iotbox.data.service.ErrorLogCommonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ErrorLogServiceImpl implements ErrorLogService {

    @Autowired
    private ErrorLogCommonService errorLogCommonService;

    @Override
    public ServerResponse catchAnomaly(ErrorLogDto errorLogDto) {

        errorLogCommonService.writerInfoErrorLog("前端异常", errorLogDto.getErrorMsg());

        return ServerResponse.createBySuccess();
    }
}
